# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/22 14:08
# File: user.py
# IDE: PyCharm

from django.db import models
from utils.common import prefix

class User(models.Model):
    user_name = models.CharField(max_length=50)
    mobile = models.CharField(max_length=20, blank=True, null=True)
    login_name = models.CharField(max_length=20)
    password = models.CharField(max_length=256)
    email = models.CharField(max_length=50, blank=True, null=True)
    login_count = models.IntegerField(default=0)
    last_login_time = models.DateTimeField(blank=True, null=True,auto_now_add=True)
    duty=models.CharField(max_length=50, blank=True, null=True)
    remark=models.CharField(max_length=50, blank=True, null=True)
    is_delete = models.IntegerField(default=0)
    is_allowed_login=models.IntegerField(default=0)
    dep_id=models.IntegerField()
    avator=models.CharField(max_length=256,blank=True)

    class Meta:
        managed = False
        db_table =prefix+ 'user'
